<template>
  <div class="mall">
    <alertTip v-if="showAlert" @closeTip="go()" :alertText="alertText"></alertTip>
    <!--   头部   -->
    <!--<headers title="首页"></headers>-->

    <!--首个关注店铺-->
    <div class="shopTop">
      <div class="left">
        <!--<i class="touXiang"></i>-->
        <img :src="shopImgUrl" alt="">
        <div class="right">
          <p>{{shopName}}</p>
          <span>已拼单：{{spellCount}}件</span>
        </div>
      </div>
      <i class="share right" @click="invite()"></i>
    </div>
    <div class="bottom" v-if="goodsArr.length!==0">
      <button @click="goin()" class="more">查看更多</button>
      <ul>
        <li v-for="(good,index) in goodsArr" @click="goPin(index)">
          <div class="goods-pic">
            <img :src="good.mallImg" alt="">
          </div>
          <div class="goods-price">
            <div class="price">&yen {{good.salePrice / 100}}</div>
            <div class="jd">京东价：{{good.jdPrice / 100}}</div>
          </div>
        </li>
      </ul>
    </div>

    <div class="goodsNone">————————— 官方商城 —————————</div>

    <!--  大图轮播  -->
    <div class="swiper">
      <mt-swipe :auto="4000">
        <mt-swipe-item>
          <div @click="banner1()"><img src="../assets/disTrueHome/1.jpg" alt="" class="swpImg"></div>
        </mt-swipe-item>
        <mt-swipe-item>
          <div @click="banner2()"><img src="../assets/disTrueHome/2.jpg" alt="" class="swpImg"></div>
        </mt-swipe-item>
        <mt-swipe-item>
          <div @click="banner3()"><img src="../assets/disTrueHome/3.jpg" alt="" class="swpImg"></div>
        </mt-swipe-item>
      </mt-swipe>
    </div>

    <!--    分割线   -->
    <div class="gray"></div>

    <!-- 品牌精选 -->
    <div class="sj">
      <div class="AllN">
        <p>品牌精选</p>
        <p>
          <router-link :to="{name: 'Brand'}">查看全部</router-link>
        </p>
      </div>
      <div class="AllShuj">
        <div class="lBig" @click="brand(index)" v-for="(mallBrand, index) in mallBrandList" v-if="index===0">
          <p>{{mallBrand.brandName}}</p>
          <button>进入专区</button>
          <img :src="mallBrand.brandImg" alt="">
          <!--<img src="../assets/disTrueHome/iphone.jpg" alt="">-->
        </div>
        <div class="lbig1">
          <div @click="brand(index)" v-for="(mallBrand,index) in mallBrandList" v-if="index!==0">
            <p>{{mallBrand.brandName}}</p>
            <img :src="mallBrand.brandImg" alt="">
            <!--<img src="../assets/disTrueHome/watch.jpg" alt="">-->
          </div>
        </div>
      </div>
    </div>

    <!--    分割线   -->
    <div class="gray"></div>

    <!--  金榜题名  -->
    <div class="productList">
      <p>金榜题名</p>
    </div>
    <div class="bottom1">
      <ul>
        <li v-for="(list,index) in mallTopList" @click="gDetail1(index)">
          <div class="goods-pic1">
            <img :src="list.mallImg" alt="">
          </div>
          <div class="goods-price1">
            <p class="name1">{{list.mallName}}</p>
            <div class="price1">平台价:{{list.salePrice / 100}}</div>
          </div>
        </li>
      </ul>
    </div>

    <!--    分割线   -->
    <div class="gray"></div>

    <!--  为您推荐  -->
    <div class="productList">
      <p>为您推荐</p>
    </div>
    <ul class="Recommend">
      <li v-for="(rema,index) in recommendMallList" @click="gDetail2(index)">
        <div class="img">
          <img :src="rema.mallImg" alt="">
        </div>

        <div class="JH">
          <p class="p1">{{rema.mallName}}</p>
          <p class="p2">已近货:{{rema.stock}}件</p>
          <div class="qian">
            <p class="p3">￥{{rema.salePrice / 100}}</p>
          </div>
          <div class="JD">
            <p class="p5">京东价:{{rema.jdPrice / 100}}</p>
          </div>
        </div>
      </li>
    </ul>

    <!--遮罩层-->
    <div class="zhezhao" v-if='zhezhao1' @click="zzceng1()">
      <div class="wenzi">
              <span class="wenzi">
              长按图片，点击"发送给好友"<br>
              扫码即刻关注店铺
            </span>
      </div>
      <div class="zzc1_content" v-if="zzc1">
        <div class="content">
          <img :src="shopImgUrl" alt="" class="content-img">
          <p>{{shopName}}</p>
          <p>更多优惠,等你来拼!</p>
          <canvas class="tupian" id="canvas">
            <!--<img id="canvas" src="./../assets/images/shops/erweima.png" alt="">-->
          </canvas>
          <p>记得邀请好友参与，拼单更快哦！</p>
        </div>
      </div>
    </div>
    <loading v-show="showLoading "></loading>
  </div>
</template>

<script>
  /* eslint-disable semi,no-unused-vars */

  import Swiper from '../../static/swiper.min.js'
  import Vue from 'vue'
  import QRCode from 'qrcode'
  import wx from 'weixin-js-sdk'
  import { wxHttpTool,wx_config, http_getParam, get_shopQrcoe,wx_share,wx_hideAllMenu } from '../components/httpUtil/httpUtil'
  import {msg_10046} from '../message/msg_10046'
  import { relogin } from "../components/httpUtil/httpUtil";

  Vue.use(QRCode)

  let swiper;
  export default {
    name: '',
    data() {
      return {
        shop: {},
        shopName: '店铺名称',
        shopId: window.localStorage.shopId,
        shopImgUrl: '../../src/assets/images/login/logo.png',
        spellCount: 0,
        goodsArr: [], //呈现商品数据
        mallBrandList: {}, //品牌精选
        mallTopList: {},  // 金榜题名
        recommendMallList: {},  // 为您推荐
        zhezhao1: false,
        zzc1: false,
        show: false,
        showAlert: false,
        showLoading: true, //显示加载动画
        alertText: null
      }
    },
    // mounted() {
    //
    //   wxHttpTool.wxAuthor(this, function (varRet, varJson, varThis = this) {
    //     if (varRet == -1) {
    //       varThis.alertTip('网络错误');
    //       varThis.go = function () {
    //         varThis.showAlert = false;
    //       }
    //
    //     }
    //     console.log(http_getParam('shopId'))
    //     varThis.shopId = http_getParam("shopId")
    //     varThis.scanCode()
    //
    //   })
    // },
    created() {

      wxHttpTool.wxAuthor(this, function (varRet, varJson, varThis = this) {
        if (varRet == -1) {
          varThis.alertTip('网络错误');
          varThis.go = function () {
            varThis.showAlert = false;
          }

        }
        console.log(http_getParam('shopId'))
        varThis.shopId = http_getParam("shopId")
        window.localStorage.shopId = http_getParam("shopId")
        varThis.scanCode()

        // 关注钱应该判断下是否已经关注过了
        msg_10046.send(varThis, msg_10046.entity(), function (varThis, res) {
          varThis.wxlist = res.data.p.sign
          varThis.hideLoading();
          wx_config(varThis.wxlist);
          varThis.hideLoading();
          wx_hideAllMenu();
          wx.hideMenuItems({
            //禁用单独分享朋友圈QQ空间等功能
            menuList: ["menuItem:share:timeline", "menuItem:share:QZone", "menuItem:share:qq"] // 要隐藏的菜单项，所有menu项见附录3
          });
        })


      },0)
    },
    updated() {
      this.useqrcode();

    },
    methods: {
      Pro(fun) {
        return new Promise((res, rej) => {
          fun()
        })
      },
      winReload: function (cond) {
        window.location.reload();
      },
      fn10019() {
        const jsonValue = JSON.stringify({
          "c": "10019",
          "p": {
            "mallName": "",
            "tokenId": token(),
            "userId": JSON.parse(window.localStorage.data).id
          }
        });
        this.$http.post(api + '/qqs.us', jsonValue).then((res) => {
          this.hideLoading();
          console.log(res);
          const data = res.data.p;
//          console.log(data.address)
          if (data.isTrue === true) {
            this.recommendMallList = res.data.p.recommendMallList
            this.mallBrandList = res.data.p.mallBrandList
            this.mallTopList = res.data.p.mallTopList

          } else {
            console.log('登陆过期')
            this.alertTip(data.errorMsg);
            if (data.errorCode === 90) {
              this.go = () => {
                console.log('这里是10009')
                this.showAlert = false
                this.$router.replace('/middle')
              }
            }
          }
        }, (res) => {
          this.hideLoading();
          this.alertTip('网络错误');
          this.go = function () {
            this.showAlert = false;
          }
        })
      },
      alertTip(msg) {
        this.showAlert = true;
        this.alertText = msg;
      },
      // 扫码店铺数据
      loadData() {
        console.log(http_getParam('shopId'))
        const jsonValue = JSON.stringify({
          'c': '10020',
          'p': {
            'userId': JSON.parse(window.localStorage.data).id, // 用户ID
            'tokenId': token(),
//            'shopId': window.localStorage.shopId,
            'shopId': http_getParam('shopId'), // 店铺ID
            'pageSize': 6,
            'startIndex': 0// 开始位置
          }
        });
        console.log('<<<<<<<shopid :' + http_getParam('shopId'))
        this.$http.post(api + '/qqs.us', jsonValue).then((res) => {
          this.hideLoading();
          const data = res.data.p;
          console.log(res)
          if (data.isTrue === true) {
            this.shopName = data.shop.shopName;
            this.shopImgUrl = data.shopImgUrl;
            this.spellCount = data.spellCount;
            this.shop = data.shop;

            this.goodsArr = data.mallList;
            this.wx_Init();
          } else {
            this.alertTip(data.errorMsg);
            if (data.errorCode === 90) {
              this.go = () => {
                this.showAlert = false
                let _this = this
                relogin(_this)
              }
            }
          }
        })
      },
      wx_Init() {
        //先隐藏掉所有接口

        msg_10046.send(this, msg_10046.entity(), function (varThis, res) {

          varThis.wxlist = res.data.p.sign
          varThis.hideLoading();
          wx_config(varThis.wxlist);

          /*  alert(window.location.href)*/
          let l_ShopUrl = get_shopQrcoe(http_getParam('shopId'), http_getParam('shopType'))
          console.log('shopUrl:' + l_ShopUrl)
          wx_hideAllMenu();
          wx_share(varThis.shop.shopName, l_ShopUrl, varThis.shopImgUrl, varThis.shop.description);
        })
      },
      // 判断是否通过二维码进入店铺
      scanCode() {
        console.log(http_getParam('shopType'))

        // 如果不是扫码进入,indexOf()要检索的字符串值没有出现，则该方法返回 -1
        if (!http_getParam('shopType') || Number(http_getParam('shopType')) !== 1) {
          this.hideLoading();
          this.alertTip('缺少店铺信息');
          this.go = function () {
            this.showAlert = false;
            localStorage.clear();
          }
          return;
        }
        console.log(window.localStorage.data);
        this.Pro(this.getData).then(this.fn10019());// 显示扫码店铺信息


      },
      // 扫码关注店铺
      focusShop() {
        const jsonValue = JSON.stringify({
          'c': '10053',
          'p': {
            'userId': JSON.parse(window.localStorage.data).id, // 用户ID
            'tokenId': token(),
//            'shopId': window.localStorage.shopId,
            'shopId': http_getParam('shopId'), // 店铺ID
            'pageSize': 10,
            'startIndex': 0 // 开始位置
          }
        });
        this.$http.post(api + '/qqs.us', jsonValue).then((res) => {
          this.hideLoading();
          console.log(res);
          const data = res.data.p;
          if (data.isTrue === true) {
            this.alertTip('成功关注店铺');
            this.go = function () {
              this.showAlert = false;
            }
          } else {
            this.alertTip(data.errorMsg);
            if (data.errorCode === 90) {
              this.go = () => {
                console.log('这里是10053扫码')
                this.showAlert = false
                let _this = this
                relogin(_this)
              }
            }
          }
        }, (res) => {
          this.hideLoading();
          this.alertTip('网络错误');
          this.go = function () {
            this.showAlert = false;
          }
        })
      },

      // 隐藏动画
      hideLoading() {
        this.showLoading = false;
      },
      go() {
        this.showAlert = false
      },
      // 生成店铺二维码
      useqrcode() {
//        const shopStr = window.location.search;
        const shopUrl = get_shopQrcoe(http_getParam('shopId'), 1);//this.shop.shopUrl;

        console.log(shopUrl)
        let canvas = document.getElementById('canvas')
        let canvs = QRCode.toCanvas(canvas, shopUrl, function (error) {
          if (error) console.error(error)
          console.log('success!');
        })
      },
      getData() {
        console.log(window.localStorage.data)
        if (window.localStorage.data) {
          const jsonValue = JSON.stringify({
            'c': '10033',
            'p': {
              'userId': JSON.parse(window.localStorage.data).id, // 用户ID
//            'userId': 1009, // 用户ID
              'tokenId': token(),
              'startIndex': 0,
              'pageSize': 10
            }
          });
          this.$http.post(api + '/qqs.us', jsonValue).then((res) => {
            this.hideLoading();
            console.log(res);
            const data = res.data.p;
            if (data.isTrue) {
              this.hideLoading();

              console.log(data.shopList.indexOf('"id":' + http_getParam('shopId')) == -1)
              if (data.shopList.indexOf('"id":' + http_getParam('shopId')) == -1) {
//                alert('hahahha')
                this.focusShop();
                this.loadData()
              } else {
//                alert('dkkkkkkkk')
                this.loadData()
              }

            } else {
              this.hideLoading();
              this.showAlert = true;
              this.alertText = data.errorMsg
              if (data.errorCode === 90) {
                this.go = () => {
                  console.log('这里是getData')
                  this.showAlert = false
                  // let _this = this;
                  // relogin(_this)
                  this.$router.go(0);
                }
              }
            }
          }, (res) => {
            this.hideLoading();
            this.alertTip('网络错误');
            this.go = function () {
              this.showAlert = false;
            }
          })
        }
        else {

          this.hideLoading();
          this.show = false

        }

      },
      banner1() {
        this.$router.push("./SpecialTx")
      },
      banner2() {
        localStorage.setItem('FL', JSON.stringify({
          'fid': 14, // 1级分类id
          'id': 73, // 2级分类id
          'kindname': "石英女式表"
        }))
        this.$router.push("./MemberList")
      },
      banner3() {
        localStorage.setItem('FL', JSON.stringify({
          'fid': 3, // 1级分类id
          'id': 33, // 2级分类id
          'kindname': "厨房小电"
        }))
        this.$router.push("./MemberList")

      },

      goin() {
        window.localStorage.shopId = this.shop.id;
        this.$router.push({name: 'homeAllSort', params: {}})
      },
      goPin(index) {
        window.localStorage.msId = this.goodsArr[index].msId;
        window.localStorage.mallId = this.goodsArr[index].mallId;
        window.localStorage.gpId = this.goodsArr[index].gpId;
        window.localStorage.pinGoodsNum = this.goodsArr[index].goodsNum
        console.log(this.goodsArr[index].msId);
        this.$router.push({
          path: '/pindetail',
          query: {
            shopId: this.shop.id,
            msId: window.localStorage.msId,
            gpId: window.localStorage.gpId,
            shopType: 1
          }
        });
      },
      brand(index) {
        localStorage.setItem('FL', JSON.stringify({
          'fid': 16, // 1级分类id
          'id': 22, // 2级分类id
          'kindname': "手机配件"
        }))
        this.$router.push({name: 'MemberList', params: {brandId: this.mallBrandList[index].id}})
      },
      gDetail1(index) {
        window.localStorage.mallId = this.mallTopList[index].mallId;
        this.$router.push({
          path: '/detail',
          query: {
            shopId: this.shop.id,
            mallId: window.localStorage.mallId,
            shopType: 1
          }
        })
      },
      gDetail2(index) {
        window.localStorage.mallId = this.recommendMallList[index].mallId;
        this.$router.push({
          path: '/detail',
          query: {
            shopId: this.shop.id,
            mallId: window.localStorage.mallId,
            shopType: 1
          }
        })
      },
      invite() {
        this.zhezhao1 = true;
        this.zzc1 = true;
      },
      zzceng1() {
        // 点击遮罩层关闭
        this.zhezhao1 = false;
        this.zzc1 = false;
      }
    }
  }
</script>

<style scoped lang="scss">
  .mall {
    /*padding-bottom: 95px;*/
    background: #f4f4f4;
  }

  .goodsNone {
    color: #D3D3D3;
    height: 30px;
    text-align: center;
    padding: 10px 0;
  }

  .shopTop {
    height: 178px;
    background: url("../assets/images/home/topTu.png") no-repeat;
    background-size: 100%; /*让图片自适应大小*/
  }

  .shopTop .left {
    margin: 40px 0 0 40px;
  }

  .shopTop .left img {
    display: inline-block;
    width: 90px;
    height: 90px;
    background: #f3f7fb;
    border-radius: 50%;
    margin-right: 20px;
    /*float: left;*/
  }

  .shopTop .left .right p {
    font-size: 30px;
    color: #fff;
    margin-top: 12px;
    /*文字太长，之后省略*/
    width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /*float: right;*/
  }

  .shopTop .left .right span {
    font-size: 20px;
    color: #ccc;
  }

  .shopTop .share {
    display: inline-block;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: url("../assets/images/home/share.png") no-repeat;
    background-size: 100%;
    margin: 50px 30px 0 0;
  }

  .bottom {
    width: 100%;
    height: 340px;
    box-sizing: border-box;
    /*padding: 22px 10px 0 20px;*/
    background: #ffffff;
    text-align: center;
    ul {
      overflow-x: auto;
      overflow-y: hidden;
      height: 280px;
      display: flex;
      justify-content: flex-start;
      flex-flow: row nowrap;
      margin-top: 10px;
      li {
        margin: 0 15px;
        height: 100%;
        .goods-pic {
          width: 180px;
          height: 180px;
          margin-bottom: 10px;
          /*border: 1px solid #f4f4f4;*/
          background: #f3f7fb;
          img {
            width: 180px;
            height: 180px;
          }
        }
        .goods-price {
          text-align: center;
          .price {
            font-size: 32px;
            color: #fe3519;
          }
          .jd {
            font-size: 20px;
            color: #a1a1a1;
          }
        }
      }
    }
    .more {
      margin-left: 480px;
      outline: none;
      border: none;
      font-size: 22px;
      color: #cccccc;
      background: none;
      margin-top: 5px;
    }
  }

  /*轮播图*/
  .swiper {
    /*margin-top: 20px;*/
    /*width: 100%;*/
    height: 320px;
    padding: 10px;
    /*background: url("../assets/disTrueHome/bg.jpg");*/
    background: #ffffff;
    img {
      width: 100%;
      height: 320px;
    }
  }

  .gray {
    width: 100%;
    height: 20px;
    background: #f4f4f4;
  }

  .sj {
    width: 100%;
    height: 100%;
    background: #ffffff;
    .AllN {
      width: 100%;
      height: 69px;
      background: #ffffff;
      display: flex;
      border-bottom: 1px solid #f4f4f4;
      P:nth-of-type(1) {
        width: 50%;
        font-size: 24px;
        color: #3b3b43;
        margin-top: 22px;
        margin-left: 30px;
      }

    }
    .AllN {
      width: 100%;
      height: 69px;
      background: #ffffff;
      display: flex;
      border-bottom: 1px solid #f4f4f4;
      P:nth-of-type(2) {
        width: 50%;
        font-size: 24px;
        color: #3b3b43;
        margin-top: 22px;
        margin-left: 30px;
        text-align: right;
        margin-right: 30px;
      }

    }

    .AllShuj {
      width: 100%;
      height: 498px;
      margin: auto;
      .lBig {
        margin: 0 10px;
        height: 195px;
        margin-top: 20px;
        background: #f3f7fb;
        position: relative;
        p {
          font-size: 28px;
          color: #3c3e45;
          padding-left: 37px;
          padding-top: 47px;
        }
        button {
          background: url("../assets/btn_pindan@1x.png");
          background-size: 100% 100%;
          border: none;
          outline: none;
          border-radius: 10px;
          color: #ffffff;
          font-size: 25px;
          width: 150px;
          height: 50px;
          margin: 16px 0 0 30px;
        }
        img {
          width: 236px;
          height: 135px;
          position: absolute;
          top: 35px;
          right: 30px;
        }
      }
      .lbig1 {
        width: 100%;
        margin-top: 20px;
        display: flex;
        justify-content: space-around;
        div {
          width: 29%;
          height: 235px;
          background: #f3f7fb;
          position: relative;
          p {
            padding-top: 25px;
            text-align: center;
            font-size: 24px;
            color: #3c3e45;
          }
          img {
            width: 120px;
            height: 120px;
            position: absolute;
            top: 90px;
            left: 50%;
            transform: translate(-50%);
          }
        }
        div:nth-of-type(1) {
          margin-left: 0px;
        }
      }
    }
  }

  .productList {
    width: 100%;
    height: 69px;
    background: #ffffff;
    border-bottom: 1px solid #f4f4f4;
    line-height: 69px;
    P:nth-of-type(1) {
      font-size: 24px;
      color: #3b3b43;
      margin-left: 30px;
    }
  }

  .bottom1 {
    width: 100%;
    height: 320px;
    box-sizing: border-box;
    padding: 22px 20px 0 20px;
    background: #ffffff;
    ul {
      overflow-x: auto;
      overflow-y: hidden;
      height: 100%;
      display: flex;
      justify-content: flex-start;
      flex-flow: row nowrap;
      li {
        margin: 0 15px;
        height: 100%;
        .goods-pic1 {
          width: 180px;
          height: 180px;
          margin-bottom: 10px;
          /*border: 1px solid #f4f4f4;*/
          background: #f3f7fb;
          img {
            width: 180px;
            height: 180px;
          }
        }
        .goods-price1 {
          text-align: center;
          P:nth-of-type(1) {
            width: 174px;
            font-size: 24px;
            color: #3b3b43;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
          .price1 {
            font-size: 20px;
            color: #a1a1a1;
            margin-top: 15px;
            text-align: center;
          }
        }
      }
    }
  }

  /*.div1 {
    width: 100%;
    overflow: hidden;
    height: 320px;
    background: #ffffff;
    ul:nth-of-type(1) {
      display: flex;
      margin-top: 15px;
      li {
        height: 300px;
        width: 180px;
        margin-left: 20px;
        div{
          width: 180px;
          height: 180px;
          border: 1px solid #f4f4f4;
          img {
            width: 180px;
            height: 180px;
          }
        }
        p:nth-of-type(1) {
          width: 174px;
          font-size: 24px;
          color: #3b3b43;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          margin-top: 15px;
        }
        p:nth-of-type(2) {
          font-size: 20px;
          color: #a1a1a1;
          margin-top: 15px;
          text-align: center;
        }
        p:nth-of-type(3) {
          font-size: 24px;
          color: #fe3519;
          margin-top: 15px;
          text-align: center;
        }
      }
      li:nth-of-type(1) {
        margin-left: 30px;
      }
    }
  }*/

  .Recommend {
    width: 100%;
    li {
      width: 100%;
      height: 296px;
      background: #ffffff;
      display: flex;
      border-bottom: 1px solid #f4f4f4;
      .img {
        width: 220px;
        height: 220px;
        /*border: 1px solid #f4f4f4;*/
        margin: 26px 0 0 26px;
        background: #f3f7fb;
        img {
          width: 220px;
          height: 220px;
        }
      }
      .JH {
        margin: 24px 10px 0 26px;
        .p1 {
          font-size: 28px;
          color: #3b3b43;
          text-overflow: -o-ellipsis-lastline;
          overflow: hidden;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
        }
        .p2 {
          font-size: 20px;
          color: #a1a1a1;
          margin-top: 22px;
        }
        .qian {
          display: flex;
          margin-top: 30px;
          .p3 {
            color: #3b3b43;
            font-size: 32px;
          }
          .p4 {
            color: #fd4c2e;
            font-size: 32px;
            margin-left: 72px;
          }
        }
        .JD {
          display: flex;
          margin-top: 14px;
          .p5 {
            font-size: 20px;
            color: #a1a1a1;
          }
          .p6 {
            margin-left: 72px;
            color: #a1a1a1;
            font-size: 20px;
          }
        }
      }
    }
  }

  /*立即参团遮罩层*/
  .zhezhao {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 20000;
    position: fixed;
    top: 0px;
  }

  .zhezhao .zzc1_content, .zzc2_content {
    width: 500px;
    height: 240px;
    background: #fff;
    position: absolute;
    top: 260px;
    /*right: 78px;*/
    left: 50%;
    transform: translate(-50%, 0); /*左边50%，再平移自身的-50%*/
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 10px;
  }

  .zhezhao .wenzi {
    width: 400px;
    height: 116px;
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    top: 80px;
    text-align: center;
  }

  .zhezhao .wenzi > span {
    font-size: 28px;
    color: #ffc731;
    text-align: center;
  }

  .zhezhao .zzc1_content {
    width: 490px;
    height: 604px;
    box-sizing: border-box;
    padding: 30px;
    background: linear-gradient(#f38571, #f1543e);
  }

  .zhezhao .zzc1_content .content {
    width: 100%;
    height: 100%;
    background-color: #fff;
    box-sizing: border-box;
    padding: 38px 30px;
    border-radius: 8px;
  }

  .zhezhao .zzc1_content .content .content-img {
    float: left;
    width: 80px;
    height: 80px;
    margin: 0 20px;
    border-radius: 50%;
  }

  .zhezhao .zzc1_content .content p:nth-child(2) {
    width: 230px;
    float: left;
    font-size: 28px;
    color: #454343;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zhezhao .zzc1_content .content p:nth-child(3) {
    margin-top: 6px;
    width: 232px;
    float: left;
    font-size: 20px;
    color: #a1a1a1;
  }

  .zhezhao .zzc1_content .content p:last-child {
    width: 100%;
    font-size: 22px;
    color: #fe3519;
    text-align: center;
  }

  .zhezhao .zzc1_content .content .tupian {
    width: 307px !important;
    height: 307px !important;
    margin: 0 auto 0 !important;
    margin-left: 30px !important;
    border: none;
  }

  #canvas {
    width: 307px !important;
    height: 307px !important;
    margin: 0 auto 0 !important;
    margin-left: 30px !important;
    border: none;
  }
</style>
